Implement 0.3.0: Test Locally, Secure by Default#18
Merged
Conversation
This release adds comprehensive workflow testing and sandbox policy features: Workflow Test Mode (`localmost test`): - Run workflows locally before pushing to catch issues faster - Intercepts actions/checkout to use local working tree - Intercepts actions/cache for local caching - Stubs upload/download-artifact actions - Matrix support (--full-matrix, --matrix flags) - Environment diff reporting (--env flag) Declarative Sandbox Policy (.localmostrc): - Per-repo policy files declaring allowed network/filesystem access - Default-deny sandbox enforced at runtime - Per-workflow policy overrides - Discovery mode (--updaterc) generates policies from observed access - Policy validation with `localmost policy validate` Secrets Management: - Secure storage in macOS Keychain - CLI commands: secrets set/get/delete/list/clear - Per-repository scoping Environment Comparison: - `localmost env` shows local tooling versions - Compare against GitHub runner environments - Suggestions for pinning versions in workflows Background Runner Integration: - Policy cache per repository - Requires approval when .localmostrc changes - Diff display for policy modifications New shared modules in src/shared/: - workflow-parser.ts: Parse GitHub Actions YAML - step-executor.ts: Execute workflow steps with sandbox - sandbox-profile.ts: Generate macOS sandbox-exec profiles - localmostrc.ts: Parse and validate policy files - action-fetcher.ts: Download and cache actions - workspace.ts: Create temp workspaces for test runs - secrets.ts: Keychain-based secret storage - environment.ts: Detect and compare environments New CLI commands: - localmost test: Run workflows locally - localmost secrets: Manage workflow secrets - localmost policy: Manage .localmostrc policies - localmost env: Show environment info
- Remove Keychain-based secrets management (use env vars instead) - Delete src/cli/secrets.ts and src/shared/secrets.ts - Update test.ts to resolve secrets from process.env - Move getRepositoryFromDir to workspace.ts - Add comprehensive test suites for shared modules: - workflow-parser.test.ts (182 tests) - localmostrc.test.ts - sandbox-profile.test.ts - workspace.test.ts - environment.test.ts - Fix localmostrc validation for array inputs - All 459 tests pass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This release adds comprehensive workflow testing and sandbox policy features:
Workflow Test Mode (
localmost test):Declarative Sandbox Policy (.localmostrc):
localmost policy validateSecrets Management:
Environment Comparison:
localmost envshows local tooling versionsBackground Runner Integration:
New shared modules in src/shared/:
New CLI commands: